function promise(api,obj) {
  return new Promise((resolve, reject) => {
    api({ ...obj, success: resolve, fail:reject })
    // 等价下面的方法
    // api.call(wx,{...obj,success: resolve,fail: reject})
  })
}
module.exports = {
  request: function (obj) {
    return promise(wx.request,obj)
  }
}